home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
thrmde
/
therm.frm
< prev
next >
Wrap
Text File
|
1995-01-02
|
4KB
|
105 lines
VERSION 2.00
Begin Form Thermometer
BackColor = &H00C0C0C0&
BorderStyle = 1 'Fixed Single
Caption = "Progress Meter"
ClientHeight = 3330
ClientLeft = 2025
ClientTop = 1365
ClientWidth = 6465
ControlBox = 0 'False
Height = 3735
Left = 1965
LinkTopic = "Thermometer"
MaxButton = 0 'False
MinButton = 0 'False
MousePointer = 11 'Hourglass
ScaleHeight = 3330
ScaleWidth = 6465
Top = 1020
Width = 6585
Begin SSPanel Gauge
FloodType = 1 'Left To Right
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 510
Left = 705
TabIndex = 0
Top = 1755
Width = 5100
End
Begin Label txt_message
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "Please Wait..."
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 1095
Left = 345
TabIndex = 1
Top = 225
Width = 5775
End
End
'*******************************************************
'* *
'* File Name: Therm.FRM *
'* *
'* Created: 12/22/94 By: RDV *
'* *
'* Comments: Displays a progress thermometer. *
'* See Therm.BAS for interface. *
'* *
'*******************************************************
Option Explicit
Const GWL_STYLE = (-16)
Const WS_DISABLED = &H8000000
Const MOUSE_HOURGLASS = 11
Const MOUSE_DEFAULT = 0
Option Base 1
Dim a_disabledForms() As Long
Dim i_disabledCount As Long
Declare Function GetWindowLong Lib "User" (ByVal hWnd As Integer, ByVal nIndex As Integer) As Long
Declare Function SetWindowLong Lib "User" (ByVal hWnd As Integer, ByVal nIndex As Integer, ByVal dwNewLong As Long) As Long
Sub Form_Load ()
Dim l_winStyle As Long
Dim i As Integer
screen.MousePointer = MOUSE_HOURGLASS
i_disabledCount = 0
For i = 0 To Forms.Count - 1
l_winStyle = GetWindowLong(Forms(i).hWnd, GWL_STYLE)
If l_winStyle And Not WS_DISABLED And Forms(i).hWnd <> Me.hWnd Then
l_winStyle = SetWindowLong(Forms(i).hWnd, GWL_STYLE, l_winStyle Or WS_DISABLED)
i_disabledCount = i_disabledCount + 1
ReDim Preserve a_disabledForms(i_disabledCount) As Long
a_disabledForms(i_disabledCount) = Forms(i).hWnd
End If
Next i
End Sub
Sub Form_Unload (Cancel As Integer)
Dim l_winStyle As Long
Dim l_winStyle2 As Long
Dim i As Integer
For i = 1 To i_disabledCount
l_winStyle = GetWindowLong(a_disabledForms(i), GWL_STYLE)
l_winStyle2 = SetWindowLong(a_disabledForms(i), GWL_STYLE, l_winStyle And Not WS_DISABLED)
l_winStyle2 = GetWindowLong(a_disabledForms(i), GWL_STYLE)
Next i
screen.MousePointer = MOUSE_DEFAULT
End Sub